<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><%= title %></title>
</head>
<body>
  <h1><%= title %></h1>
  <p>这是使用EJS模板引擎渲染的页面</p>
  
  <% if (user) { %>
    <div class="user-info">
      <h2>欢迎您，<%= user.username %>！</h2>
    </div>
  <% } else { %>
    <div class="login-prompt">
      <p>请先<a href="/api/login">登录</a></p>
    </div>
  <% } %>
  
  <div class="server-info">
    <p>服务器时间：<%= serverTime %></p>
    <p>环境：<%= environment %></p>
  </div>
</body>
</html>